// Agent reviewmanagement in project Conferencefull.mas2j
/* Initial beliefs and rules */
/* Initial goals */
/* Plans */

+recevicereviewerDetail[source(A)] <- .print("Review Detail Recived From ", A);
									reviewerDetailRecevied;
									 ?paperNum(N);
									 .print("Invite Reviewers");
							 		 inviteReviewers(N).
							 
+accept[source(A)] <- 	.print("Receive Accept to Review From ", A);
						 acceptToReview;
						.print("Ask ",A," For Prefs ");
						.send(A, tell, receivePref).
						 
+reject[source(A)] <- 	.print("Receive Reject to Review From ", A);
						!dealWithRejection(A). 
						
+!dealWithRejection(A): dealWithRejection
					<- .print("----------->Deal With ", A, "'s Review Reject");
						dealWithReject.

+!dealWithRejection(A): not dealWithRejection 
					<- 	rejectToReview.
					
+receivePrefs(R,N)[source(A)] <-  .print("Prefs Received From ",R," On Author",N,"'s Paper");
								preferenceReceived;
								.print("Collect Prefs");
								collectPreference;
								.print("Assign Papers to ", R);
								.send(R, tell, receviePaper(N)).
													 
+receiveReviewrReports(N)[source(A)] <- .print("**********************Review Reports Recivied On Paper",N," From ", A);
										receiveReviewReport;
										.print("Collect Review Reports On Paper", N);
										collectReviewReport.
									 
+receiveDecision[source(A)] <- .print("Decision Received");
								decisionReceived;
								.print("Finalise decision");
								finaliseDecision;
								.print("Send Notification");
								?paperNum(N);
								.print("Send Notification");
								sendNotification(N).
								
+emergency(N)[source(A)] <- .print("Receive Emergency Notification");
							.print("----------->Invite Reviewer for Dealing With Emergency on Paper",N);
							inviteReviewersInEmergency(N).
					

